package com.mew.lobby.message.response;

import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.*;

import java.util.List;

/**
 * @Description: TODO
 * @Author King.Song
 * @Date 2020/11/14 0014
 **/
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class RoomListResponseMessage extends ZebraBaseMessage<RoomListResponseMessage> {

    private List<RoomInfoMessage> list;

    @Override
    public void write(ByteBuf b) {


         writeInt(b, list.size());
         for (RoomInfoMessage message : list){
             message.write(b);
         }
    }

    @Override
    public RoomListResponseMessage read(ByteBuf b) {
       return null;
    }


}
